<div class="container"> 
    <div class="leaderboard-ad-container">
        <img src="<?php echo IMAGE_UPLOAD_DIR; ?>ad1.jpg" />
    </div>
<!-- Jumbotron
      ================================================== -->
        <div class="row">
          <div class="col-md-8 col-xs-12">
            <div class="jumbotron">
              <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                <ol class="carousel-indicators">
                 <?php
                    $i = 0;
                    foreach($latest_news as $news): ?>
                        <li data-target="#carousel-example-generic" data-slide-to="0" class="<?php echo ($i==0)?'active':''?>"></li>
                     <?php 
                    $i++;
                    endforeach;
                    ?>
                </ol>
                <div class="carousel-inner">
                    <?php
                    $i = 0;
                    foreach($latest_news as $news): ?>
                      <div class="item <?php echo ($i==0)?'active':''?>">
                        <a href="<?php echo $module_url.'view/'.pw_hash($news['intID']); ?>">
                          <img src="<?php echo $news['strPicture']; ?>">
                          <div class="caption">
                            <h3><?php echo $news['strTitle']; ?></h3>
                            <p><?php echo $news['strSecondary']; ?></p>
                          </div>
                        </a>
                      </div>
                    <?php 
                    $i++;
                    endforeach;
                    ?>
                </div>
                <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
                  <span class="glyphicon glyphicon-chevron-left"></span>
                </a>
                <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
                  <span class="glyphicon glyphicon-chevron-right"></span>
                </a>
              </div>
            </div>
          </div>
          <div class="col-md-4 col-xs-12">
            <div class="panel">
              <ul id="myTab1" class="nav nav-tabs nav-justified">
                <li class="active"><a href="#new" data-toggle="tab">NEW</a></li>
                <li><a href="#latest" data-toggle="tab">TRENDING</a></li>
              </ul>
              <div id="myTabContent" class="tab-content">
                <div class="tab-pane fade active in" id="new">
                  <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica.</p>
                </div>
                <div class="tab-pane fade" id="latest">
                    
                    <?php foreach($trending as $trend): ?>
                       <article class="row blog-article">
				 			<h4 class="blog-title"><?php echo $trend['strTitle']; ?></h4>
                            <div class="blog-img"><img class="img-rounded img-responsive" src="<?php echo $trend['strPicture']; ?>" /></div>
                            <p><?php echo $trend['strSecondary']; ?></p>
                           <a href="<?php echo $module_url.'view/'.pw_hash($trend['intID']); ?>" class="readmore">read more >> </a>
				 		</article>
                        
                    <?php endforeach; ?>
                    </ul>
                </div>
                
              </div>
            </div>
          </div>
          
        </div>   
</div>